<template>
  <router-view v-if="isRouterAlive"></router-view>
</template>
<script>
import { nextTick, provide, ref } from "vue";
export default {
  name: "App",
  setup(){
    const isRouterAlive = ref(true);
    const reload = () => {
      isRouterAlive.value = false;
      nextTick(() => {
        isRouterAlive.value = true;
      });
    };
    provide("reload", reload);

    return {
      isRouterAlive,
    };
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /*text-align: center;*/
  color: #2c3e50;
  /*margin-top: 30px;*/
  /*height: 100%;*/
  /*background-color: #f7f8fa;*/
}
</style>
